package com.ruoyi.sys.energ.service.impl;

import java.util.List;

import com.ruoyi.sys.energ.entity.TbEnergCaution;
import com.ruoyi.sys.energ.mapper.TbEnergCautionMapper;
import com.ruoyi.sys.energ.service.ITbEnergCautionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 能耗告警记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-24
 */
@Service
public class TbEnergCautionServiceImpl implements ITbEnergCautionService
{
    @Autowired
    private TbEnergCautionMapper tbEnergCautionMapper;

    /**
     * 查询能耗告警记录
     * 
     * @param ecId 能耗告警记录主键
     * @return 能耗告警记录
     */
    @Override
    public TbEnergCaution selectTbEnergCautionByEcId(Long ecId)
    {
        return tbEnergCautionMapper.selectTbEnergCautionByEcId(ecId);
    }

    /**
     * 查询能耗告警记录列表
     * 
     * @param tbEnergCaution 能耗告警记录
     * @return 能耗告警记录
     */
    @Override
    public List<TbEnergCaution> selectTbEnergCautionList(TbEnergCaution tbEnergCaution)
    {
        return tbEnergCautionMapper.selectTbEnergCautionList(tbEnergCaution);
    }

    /**
     * 新增能耗告警记录
     * 
     * @param tbEnergCaution 能耗告警记录
     * @return 结果
     */
    @Override
    public int insertTbEnergCaution(TbEnergCaution tbEnergCaution)
    {
        return tbEnergCautionMapper.insertTbEnergCaution(tbEnergCaution);
    }

    /**
     * 修改能耗告警记录
     * 
     * @param tbEnergCaution 能耗告警记录
     * @return 结果
     */
    @Override
    public int updateTbEnergCaution(TbEnergCaution tbEnergCaution)
    {
        return tbEnergCautionMapper.updateTbEnergCaution(tbEnergCaution);
    }

    /**
     * 批量删除能耗告警记录
     * 
     * @param ecIds 需要删除的能耗告警记录主键
     * @return 结果
     */
    @Override
    public int deleteTbEnergCautionByEcIds(Long[] ecIds)
    {
        return tbEnergCautionMapper.deleteTbEnergCautionByEcIds(ecIds);
    }

    /**
     * 删除能耗告警记录信息
     * 
     * @param ecId 能耗告警记录主键
     * @return 结果
     */
    @Override
    public int deleteTbEnergCautionByEcId(Long ecId)
    {
        return tbEnergCautionMapper.deleteTbEnergCautionByEcId(ecId);
    }
}
